
<!DOCTYPE html>
<html style="height: 100%">
<head>
    <meta charset="utf-8">
    <title>芝麻信用</title>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
    <script src="css/jquery.min.js"></script>
</head>
<style>
    #main{
        height: 100%;
    }
    body{
        height: 100%;
        margin: 0;
    }
</style>
<body>
<h1 onclick="show()">Echarts图表测试</h1>
<div id="main" ></div>

</body>
<script type="text/javascript">
    var dom = document.getElementById("main");
    var myChart = echarts.init(dom);
    var app = {};
    var option;

    option = {
        title: {
            text: '基础雷达图'
        },
        legend: {
            data: ['守约记录']
        },
        radar: {
            // shape: 'circle',
            indicator:[]
        },
        series: [{
            name: '守约记录',
            type: 'radar',
            data: []
        }]
    };
    myChart.setOption(option);

    function show() {
        var url = "http://localhost:7070/rader";
        $.get(url).done(function (data) {
            console.log(data);
            // 填入数据
            myChart.setOption({
                series: [{
                    // 根据名字对应到相应的系列
                    name: '守约记录',
                    data: data.data
                }]
            });
        });
    }
</script>
</html>
    